#ifndef QMYPUSHBUTTON_H
#define QMYPUSHBUTTON_H

#include "../../lib/shared/qobjecthost.h"

#include <QPushButton>
#include <QRadioButton>
#include <QCheckBox>

class QButtonHost: public QObjectHost
{
    Q_OBJECT
public:
    QButtonHost(QWidget* wid);
public slots:
    QString text();
    void    setText(const QString& text);
    bool    checked();
signals:
    void    setChecked(bool checked);
};

class QMyPushButton: public QPushButton
{
    Q_OBJECT
public:
    QMyPushButton(QWidget* parent=0);
    ~QMyPushButton();
protected:
    void updateStyleSheet();
public slots:
    void    updateProperty(const QString & name);
    void    clicked_signals();
    void    updatePropertyAttribute();
    void    initProperty();
signals:
    void    zValueChanged();
protected:
    QMap<QString,QString>   m_styleSheets;
    QObjectHost   *m_host;
};

class QMyRadioButton: public QRadioButton
{
    Q_OBJECT
public:
    QMyRadioButton(QWidget* parent=0);
public slots:
    void    updateProperty(const QString & name);
    void    clicked_signals();
    void    toggle_signals();
    void    updatePropertyAttribute();
    void    initProperty();
signals:
    void    zValueChanged();
protected:
    QObjectHost   *m_host;
};

class QMyCheckBox: public QCheckBox
{
    Q_OBJECT
public:
    QMyCheckBox(QWidget* parent=0);
protected:
    void updateStyleSheet();
public slots:
    void    updateProperty(const QString & name);
    void    clicked_signals();
    void    updatePropertyAttribute();
    void    initProperty();
signals:
    void    zValueChanged();
protected:
    QMap<QString,QString>   m_styleSheets;
    QObjectHost   *m_host;
};
#endif // QMYPUSHBUTTON_H
